#!/bin/bash  

echo "#Running Hotspot"
echo "#Modified by Min Li, Contact: mli46@wisc.edu"
echo -ne "#Generated Date: "
date
echo 


## make sure $BENCHNAME.steady is ready before the first run
if [ "$HSTA_INIT_RUN" != "0" ]
then
    cp $HSTA_STEADY_FILE $HSTA_INIT_FILE
fi

## Base mode, note that the .ptrace file covers multiple test sets
./hotspot -c hotspot.config -init_file $HSTA_INIT_FILE -f $HSTA_FLP_FILE -p $HSTA_PTRACE_FILE -steady_file $HSTA_STEADY_FILE

## Grid mode
#./hotspot -c hotspot.config -init_file $BENCHNAME.init -f $BENCHNAME.flp -p $BENCHNAME.ptrace -steady_file $BENCHNAME.steady -model_type grid -grid_steady_file $BENCHNAME.grid.steady 
   
#./grid_thermal_map.pl $BENCHNAME.flp $BENCHNAME.grid.steady > $BENCHNAME.svg

#./convert -font Helvetica svg:$BENCHNAME.svg $BENCHNAME.pdf

